home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsICookieManager.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  139 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICookieManager.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICookieManager_h__
  6. #define __gen_nsICookieManager_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsISimpleEnumerator_h__
  14. #include "nsISimpleEnumerator.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsICookieManager */
  23. #define NS_ICOOKIEMANAGER_IID_STR "aaab6710-0f2c-11d5-a53b-0010a401eb10"
  24.  
  25. #define NS_ICOOKIEMANAGER_IID \
  26.   {0xaaab6710, 0x0f2c, 0x11d5, \
  27.     { 0xa5, 0x3b, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 }}
  28.  
  29. /** 
  30.  * An optional interface for accessing or removing the cookies
  31.  * that are in the cookie list
  32.  * 
  33.  * @status FROZEN
  34.  */
  35. class NS_NO_VTABLE nsICookieManager : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIEMANAGER_IID)
  39.  
  40.   /**
  41.    * Called to remove all cookies from the cookie list
  42.    */
  43.   /* void removeAll (); */
  44.   NS_IMETHOD RemoveAll(void) = 0;
  45.  
  46.   /**
  47.    * Called to enumerate through each cookie in the cookie list.
  48.    * The objects enumerated over are of type nsICookie
  49.    */
  50.   /* readonly attribute nsISimpleEnumerator enumerator; */
  51.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) = 0;
  52.  
  53.   /**
  54.    * Called to remove an individual cookie from the cookie list
  55.    *
  56.    * @param aDomain The host or domain for which the cookie was set
  57.    * @param aName The name specified in the cookie
  58.    * @param aBlocked Indicates if cookies from this host should be permanently blocked
  59.    *
  60.    */
  61.   /* void remove (in AUTF8String aDomain, in ACString aName, in AUTF8String aPath, in boolean aBlocked); */
  62.   NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) = 0;
  63.  
  64. };
  65.  
  66. /* Use this macro when declaring classes that implement this interface. */
  67. #define NS_DECL_NSICOOKIEMANAGER \
  68.   NS_IMETHOD RemoveAll(void); \
  69.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator); \
  70.   NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked); 
  71.  
  72. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  73. #define NS_FORWARD_NSICOOKIEMANAGER(_to) \
  74.   NS_IMETHOD RemoveAll(void) { return _to RemoveAll(); } \
  75.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return _to GetEnumerator(aEnumerator); } \
  76.   NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) { return _to Remove(aDomain, aName, aPath, aBlocked); } 
  77.  
  78. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  79. #define NS_FORWARD_SAFE_NSICOOKIEMANAGER(_to) \
  80.   NS_IMETHOD RemoveAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveAll(); } \
  81.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnumerator(aEnumerator); } \
  82.   NS_IMETHOD Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked) { return !_to ? NS_ERROR_NULL_POINTER : _to->Remove(aDomain, aName, aPath, aBlocked); } 
  83.  
  84. #if 0
  85. /* Use the code below as a template for the implementation class for this interface. */
  86.  
  87. /* Header file */
  88. class nsCookieManager : public nsICookieManager
  89. {
  90. public:
  91.   NS_DECL_ISUPPORTS
  92.   NS_DECL_NSICOOKIEMANAGER
  93.  
  94.   nsCookieManager();
  95.  
  96. private:
  97.   ~nsCookieManager();
  98.  
  99. protected:
  100.   /* additional members */
  101. };
  102.  
  103. /* Implementation file */
  104. NS_IMPL_ISUPPORTS1(nsCookieManager, nsICookieManager)
  105.  
  106. nsCookieManager::nsCookieManager()
  107. {
  108.   /* member initializers and constructor code */
  109. }
  110.  
  111. nsCookieManager::~nsCookieManager()
  112. {
  113.   /* destructor code */
  114. }
  115.  
  116. /* void removeAll (); */
  117. NS_IMETHODIMP nsCookieManager::RemoveAll()
  118. {
  119.     return NS_ERROR_NOT_IMPLEMENTED;
  120. }
  121.  
  122. /* readonly attribute nsISimpleEnumerator enumerator; */
  123. NS_IMETHODIMP nsCookieManager::GetEnumerator(nsISimpleEnumerator * *aEnumerator)
  124. {
  125.     return NS_ERROR_NOT_IMPLEMENTED;
  126. }
  127.  
  128. /* void remove (in AUTF8String aDomain, in ACString aName, in AUTF8String aPath, in boolean aBlocked); */
  129. NS_IMETHODIMP nsCookieManager::Remove(const nsACString & aDomain, const nsACString & aName, const nsACString & aPath, PRBool aBlocked)
  130. {
  131.     return NS_ERROR_NOT_IMPLEMENTED;
  132. }
  133.  
  134. /* End of implementation class template. */
  135. #endif
  136.  
  137.  
  138. #endif /* __gen_nsICookieManager_h__ */
  139.